package lab03.test02;

import java.io.File;

/**
 * Created by 123 on 2017/12/8.
 */
class Test02 {
    public static void main(String[] args) {
        // file指的是文件和目录
        File file = new File("E:\\");
        file.listFiles();
        for (File f : file.listFiles()) {
            if (f.isDirectory()) {
                System.out.println("目录" + f.getName());
            }

            if (f.isFile()) {

                System.out.println("文件" + f.getName());
            }
        }
    }
}
